home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / monitory / amyload / closeloadwindow.c < prev    next >
C/C++ Source or Header  |  1987-11-15  |  976b  |  34 lines

  1. #include    <intuition/intuition.h>
  2. #include    <devices/load.h>
  3. #include    "execdef.h"
  4. #include    "intuidef.h"
  5. #include    "windownode.h"
  6. #include    "windowinfo.h"
  7. #include    "loadrecord.h"
  8.  
  9. #include    "CloseLoadWindow.proto"
  10.  
  11. #include    <exec/proto.h>
  12. #include    <intuition/proto.h>
  13.  
  14. void
  15. CloseLoadWindow(windownode)
  16.     WindowNode *windownode;
  17. {
  18.     LoadRecord *record, *oldrecord;
  19.  
  20.     Remove(&windownode->node);
  21.     for (record = (LoadRecord *)WINDOWINFO(windownode->window)->loadrecords.mlh_Head;
  22.      record->node.mln_Succ;  )
  23.     {
  24.     FreeMem((char *)record->start_data, (record->end_data - record->start_data) * sizeof(LoadDataValue));
  25.     oldrecord = record;
  26.     record = (LoadRecord *)record->node.mln_Succ;
  27.     FreeMem((char *)oldrecord, sizeof(LoadRecord));
  28.     }
  29.     FreeMem((char *)WINDOWINFO(windownode->window), sizeof(WindowInfo));
  30.     windownode->window->UserPort = NULL;
  31.     CloseWindow(windownode->window);
  32.     FreeMem((char *)windownode, sizeof(WindowNode));
  33. }
  34.